Optimal. Leaf size=212 \[ \frac {2 a^{5/2} c^3 \text {ArcTan}\left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {a+a \sec (e+f x)}}\right )}{f}-\frac {2 a^3 c^3 \tan (e+f x)}{f \sqrt {a+a \sec (e+f x)}}+\frac {2 a^4 c^3 \tan ^3(e+f x)}{3 f (a+a \sec (e+f x))^{3/2}}-\frac {2 a^5 c^3 \tan ^5(e+f x)}{5 f (a+a \sec (e+f x))^{5/2}}-\frac {6 a^6 c^3 \tan ^7(e+f x)}{7 f (a+a \sec (e+f x))^{7/2}}-\frac {2 a^7 c^3 \tan ^9(e+f x)}{9 f (a+a \sec (e+f x))^{9/2}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.13, antiderivative size = 212, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 4, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3989, 3972,
472, 209} \begin {gather*} \frac {2 a^{5/2} c^3 \text {ArcTan}\left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {a \sec (e+f x)+a}}\right )}{f}-\frac {2 a^7 c^3 \tan ^9(e+f x)}{9 f (a \sec (e+f x)+a)^{9/2}}-\frac {6 a^6 c^3 \tan ^7(e+f x)}{7 f (a \sec (e+f x)+a)^{7/2}}-\frac {2 a^5 c^3 \tan ^5(e+f x)}{5 f (a \sec (e+f x)+a)^{5/2}}+\frac {2 a^4 c^3 \tan ^3(e+f x)}{3 f (a \sec (e+f x)+a)^{3/2}}-\frac {2 a^3 c^3 \tan (e+f x)}{f \sqrt {a \sec (e+f x)+a}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 209
Rule 472
Rule 3972
Rule 3989
Rubi steps
\begin {align*} \int (a+a \sec (e+f x))^{5/2} (c-c \sec (e+f x))^3 \, dx &=-\left (\left (a^3 c^3\right ) \int \frac {\tan ^6(e+f x)}{\sqrt {a+a \sec (e+f x)}} \, dx\right )\\ &=\frac {\left (2 a^6 c^3\right ) \text {Subst}\left (\int \frac {x^6 \left (2+a x^2\right )^2}{1+a x^2} \, dx,x,-\frac {\tan (e+f x)}{\sqrt {a+a \sec (e+f x)}}\right )}{f}\\ &=\frac {\left (2 a^6 c^3\right ) \text {Subst}\left (\int \left (\frac {1}{a^3}-\frac {x^2}{a^2}+\frac {x^4}{a}+3 x^6+a x^8-\frac {1}{a^3 \left (1+a x^2\right )}\right ) \, dx,x,-\frac {\tan (e+f x)}{\sqrt {a+a \sec (e+f x)}}\right )}{f}\\ &=-\frac {2 a^3 c^3 \tan (e+f x)}{f \sqrt {a+a \sec (e+f x)}}+\frac {2 a^4 c^3 \tan ^3(e+f x)}{3 f (a+a \sec (e+f x))^{3/2}}-\frac {2 a^5 c^3 \tan ^5(e+f x)}{5 f (a+a \sec (e+f x))^{5/2}}-\frac {6 a^6 c^3 \tan ^7(e+f x)}{7 f (a+a \sec (e+f x))^{7/2}}-\frac {2 a^7 c^3 \tan ^9(e+f x)}{9 f (a+a \sec (e+f x))^{9/2}}-\frac {\left (2 a^3 c^3\right ) \text {Subst}\left (\int \frac {1}{1+a x^2} \, dx,x,-\frac {\tan (e+f x)}{\sqrt {a+a \sec (e+f x)}}\right )}{f}\\ &=\frac {2 a^{5/2} c^3 \tan ^{-1}\left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {a+a \sec (e+f x)}}\right )}{f}-\frac {2 a^3 c^3 \tan (e+f x)}{f \sqrt {a+a \sec (e+f x)}}+\frac {2 a^4 c^3 \tan ^3(e+f x)}{3 f (a+a \sec (e+f x))^{3/2}}-\frac {2 a^5 c^3 \tan ^5(e+f x)}{5 f (a+a \sec (e+f x))^{5/2}}-\frac {6 a^6 c^3 \tan ^7(e+f x)}{7 f (a+a \sec (e+f x))^{7/2}}-\frac {2 a^7 c^3 \tan ^9(e+f x)}{9 f (a+a \sec (e+f x))^{9/2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.28, size = 134, normalized size = 0.63 \begin {gather*} -\frac {a^2 c^3 \left (-2520 \text {ArcTan}\left (\sqrt {-1+\sec (e+f x)}\right ) \cos ^4(e+f x)+(901+164 \cos (e+f x)+1004 \cos (2 (e+f x))+68 \cos (3 (e+f x))+383 \cos (4 (e+f x))) \sqrt {-1+\sec (e+f x)}\right ) \sec ^4(e+f x) \sqrt {a (1+\sec (e+f x))} \tan \left (\frac {1}{2} (e+f x)\right )}{1260 f \sqrt {-1+\sec (e+f x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(482\) vs.
\(2(188)=376\).
time = 0.30, size = 483, normalized size = 2.28
method | result | size |
default | \(-\frac {c^{3} \sqrt {\frac {a \left (\cos \left (f x +e \right )+1\right )}{\cos \left (f x +e \right )}}\, \left (315 \sin \left (f x +e \right ) \left (\cos ^{4}\left (f x +e \right )\right ) \sqrt {2}\, \arctanh \left (\frac {\sqrt {-\frac {2 \cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \sin \left (f x +e \right ) \sqrt {2}}{2 \cos \left (f x +e \right )}\right ) \left (-\frac {2 \cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}\right )^{\frac {9}{2}}+1260 \sin \left (f x +e \right ) \left (\cos ^{3}\left (f x +e \right )\right ) \sqrt {2}\, \arctanh \left (\frac {\sqrt {-\frac {2 \cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \sin \left (f x +e \right ) \sqrt {2}}{2 \cos \left (f x +e \right )}\right ) \left (-\frac {2 \cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}\right )^{\frac {9}{2}}+1890 \sin \left (f x +e \right ) \left (\cos ^{2}\left (f x +e \right )\right ) \sqrt {2}\, \arctanh \left (\frac {\sqrt {-\frac {2 \cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \sin \left (f x +e \right ) \sqrt {2}}{2 \cos \left (f x +e \right )}\right ) \left (-\frac {2 \cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}\right )^{\frac {9}{2}}+1260 \sin \left (f x +e \right ) \cos \left (f x +e \right ) \sqrt {2}\, \arctanh \left (\frac {\sqrt {-\frac {2 \cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \sin \left (f x +e \right ) \sqrt {2}}{2 \cos \left (f x +e \right )}\right ) \left (-\frac {2 \cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}\right )^{\frac {9}{2}}+315 \sqrt {2}\, \arctanh \left (\frac {\sqrt {-\frac {2 \cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \sin \left (f x +e \right ) \sqrt {2}}{2 \cos \left (f x +e \right )}\right ) \left (-\frac {2 \cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}\right )^{\frac {9}{2}} \sin \left (f x +e \right )-12256 \left (\cos ^{5}\left (f x +e \right )\right )+11168 \left (\cos ^{4}\left (f x +e \right )\right )+5312 \left (\cos ^{3}\left (f x +e \right )\right )-4064 \left (\cos ^{2}\left (f x +e \right )\right )-1280 \cos \left (f x +e \right )+1120\right ) a^{2}}{5040 f \cos \left (f x +e \right )^{4} \sin \left (f x +e \right )}\) | \(483\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 2.75, size = 474, normalized size = 2.24 \begin {gather*} \left [\frac {315 \, {\left (a^{2} c^{3} \cos \left (f x + e\right )^{5} + a^{2} c^{3} \cos \left (f x + e\right )^{4}\right )} \sqrt {-a} \log \left (\frac {2 \, a \cos \left (f x + e\right )^{2} - 2 \, \sqrt {-a} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right ) \sin \left (f x + e\right ) + a \cos \left (f x + e\right ) - a}{\cos \left (f x + e\right ) + 1}\right ) - 2 \, {\left (383 \, a^{2} c^{3} \cos \left (f x + e\right )^{4} + 34 \, a^{2} c^{3} \cos \left (f x + e\right )^{3} - 132 \, a^{2} c^{3} \cos \left (f x + e\right )^{2} - 5 \, a^{2} c^{3} \cos \left (f x + e\right ) + 35 \, a^{2} c^{3}\right )} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sin \left (f x + e\right )}{315 \, {\left (f \cos \left (f x + e\right )^{5} + f \cos \left (f x + e\right )^{4}\right )}}, -\frac {2 \, {\left (315 \, {\left (a^{2} c^{3} \cos \left (f x + e\right )^{5} + a^{2} c^{3} \cos \left (f x + e\right )^{4}\right )} \sqrt {a} \arctan \left (\frac {\sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right )}{\sqrt {a} \sin \left (f x + e\right )}\right ) + {\left (383 \, a^{2} c^{3} \cos \left (f x + e\right )^{4} + 34 \, a^{2} c^{3} \cos \left (f x + e\right )^{3} - 132 \, a^{2} c^{3} \cos \left (f x + e\right )^{2} - 5 \, a^{2} c^{3} \cos \left (f x + e\right ) + 35 \, a^{2} c^{3}\right )} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sin \left (f x + e\right )\right )}}{315 \, {\left (f \cos \left (f x + e\right )^{5} + f \cos \left (f x + e\right )^{4}\right )}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} - c^{3} \left (\int \left (- a^{2} \sqrt {a \sec {\left (e + f x \right )} + a}\right )\, dx + \int a^{2} \sqrt {a \sec {\left (e + f x \right )} + a} \sec {\left (e + f x \right )}\, dx + \int 2 a^{2} \sqrt {a \sec {\left (e + f x \right )} + a} \sec ^{2}{\left (e + f x \right )}\, dx + \int \left (- 2 a^{2} \sqrt {a \sec {\left (e + f x \right )} + a} \sec ^{3}{\left (e + f x \right )}\right )\, dx + \int \left (- a^{2} \sqrt {a \sec {\left (e + f x \right )} + a} \sec ^{4}{\left (e + f x \right )}\right )\, dx + \int a^{2} \sqrt {a \sec {\left (e + f x \right )} + a} \sec ^{5}{\left (e + f x \right )}\, dx\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 1.77, size = 329, normalized size = 1.55 \begin {gather*} -\frac {\frac {315 \, \sqrt {-a} a^{3} c^{3} \log \left (\frac {{\left | 2 \, {\left (\sqrt {-a} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + a}\right )}^{2} - 4 \, \sqrt {2} {\left | a \right |} - 6 \, a \right |}}{{\left | 2 \, {\left (\sqrt {-a} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + a}\right )}^{2} + 4 \, \sqrt {2} {\left | a \right |} - 6 \, a \right |}}\right ) \mathrm {sgn}\left (\cos \left (f x + e\right )\right )}{{\left | a \right |}} + \frac {2 \, {\left (315 \, \sqrt {2} a^{7} c^{3} \mathrm {sgn}\left (\cos \left (f x + e\right )\right ) - {\left (1470 \, \sqrt {2} a^{7} c^{3} \mathrm {sgn}\left (\cos \left (f x + e\right )\right ) - {\left (2772 \, \sqrt {2} a^{7} c^{3} \mathrm {sgn}\left (\cos \left (f x + e\right )\right ) + {\left (257 \, \sqrt {2} a^{7} c^{3} \mathrm {sgn}\left (\cos \left (f x + e\right )\right ) \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 1314 \, \sqrt {2} a^{7} c^{3} \mathrm {sgn}\left (\cos \left (f x + e\right )\right )\right )} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2}\right )} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2}\right )} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2}\right )} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )}{{\left (a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - a\right )}^{4} \sqrt {-a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + a}}}{315 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int {\left (a+\frac {a}{\cos \left (e+f\,x\right )}\right )}^{5/2}\,{\left (c-\frac {c}{\cos \left (e+f\,x\right )}\right )}^3 \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________